<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('queryList',"MessageController@queryList");//采集数据
Route::get('list',"MessageController@list");//列表
Route::get('detail',"MessageController@detail");//详情
Route::get('delete',"MessageController@delete");//删除数据


/**
 * 后台管理系统
 * 布局后台模块
 * html视图放在resource目录里面
 * 静态文件放在public目录里面
 * 配置路由
 * 展示视图
 * 管理员列表的数据 分页查询
 */
Route::prefix('admin')->group(function (){
    Route::get('login',"LoginController@login");//展示视图
    Route::post('doLogin',"LoginController@doLogin");//登录验证
    Route::post('sendCode',"LoginController@sendCode");

    // 首页
    Route::get('index',"IndexController@index");

    // 管理员有关的内容
    Route::get('adminList',"AdminController@list");

    // 内容有关
    Route::get('articleList',"ArticleController@list");

    // 置顶修改
    Route::post('changeIsFirst',"ArticleController@changeIsFirst");
    Route::post('articleDel',"ArticleController@articleDel");
});
